#include <bits/stdc++.h>
using namespace std;
using ll = long long;

ll rr() {
    ll s = 0, w = false, c = getchar();
    for (; !isdigit(c); c = getchar())
        w = w || c == '-';
    for (; isdigit(c); c = getchar())
        s = s * 10 + c - '0';
    return w ? -s : s;
}

// END OF HEADER

int main() {
    int n = rr(), c = rr(), sum = 0;
    vector<int> x(n), flag(n);
    for (int i = 0; i < n; i++) {
        x[i] = rr();
        sum += x[i];
    }
    std::function<void(int, int, int)> dfs = [&](int pos, int ns, int rs) {
        if (ns == c) {
            for (int i = 0; i < n; i++)
                if (flag[i] == 1)
                    printf("%d ", x[i]);
            exit(0);
        } else if (pos < n) {
            if (ns + x[pos] <= c) {
                flag[pos] = 1;
                dfs(pos + 1, ns + x[pos], rs - x[pos]);
                flag[pos] = 0;
            }
            if (ns <= c && ns + rs >= c) {
                flag[pos] = 0;
                dfs(pos + 1, ns, rs - x[pos]);
            }
        }
    };
    dfs(0, 0, sum);
    printf("No Solution!");
    return 0;
}
